home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
gfxprograms
/
boards
/
retina
/
rblanke2.lha
/
RBlankers
/
blanker.h
next >
Wrap
C/C++ Source or Header
|
1994-04-04
|
3KB
|
102 lines
/*
* Default Screen settings.
*/
#define NORMAL_WIDE 640
#define NORMAL_HIGH 480
#define SMALL_WIDE 320
#define SMALL_HIGH 240
#define DEF_MODE MID_DEFAULT_08
#define PI2 6.28318539717958
#define FINC .0628318539717958
#define RAND(m) (Random(m)-(m)/2)
#define MASK(n) (1L<<(n))
/*
* Commodity Stuff
*/
#define HOTKEY_OPEN_WINDOW 1L
#define HOTKEY_BLANK_SCREEN 2L
#define DEF_CX_PRI 0
#define DEF_POPKEY "control alt s"
#define DEF_BLANKKEY "lamiga s"
/*
* Process management stuff
*/
#define MAX_TIMEOUT 3600L
#define MAX_CLIENT_TIMEOUT 60L
#define DEF_TIMEOUT 60L
#define DEF_CLIENT_TIMEOUT 5L
#define SERVER_PRI 3L
#define CLIENT_PRI -5L
extern UBYTE *PopKey;
extern UBYTE *BlankKey;
extern LONG TimeOut, ClientTimeOut;
extern struct ExecBase *SysBase;
extern struct DosLibrary *DOSBase;
extern struct IntuitionBase *IntuitionBase;
extern struct RetinaBase *RetinaBase;
extern struct Library *CxBase, *GadToolsBase, *IconBase;
extern struct ClientMessage;
extern struct Task *ServerProcess;
extern BYTE bsp_TimerSig, bsp_InputSig, bsp_ClientSig;
extern struct MsgPort *CxPort;
struct ClientMessage {
struct Message bcm_Message;
struct RetinaScreen *bcm_Screen;
LONG bcm_Status;
ULONG bcm_SigMask;
LONG bcm_Lines, bcm_Speed, bcm_Vertices;
};
/*
* We use defines for these functions just to pick up a little speed.
*/
#define SpritesOff(rs) \
{ \
struct TagItem tags[] = \
{RSP_On, 0L, TAG_DONE, 0L}; \
\
Retina_SpriteFunction(rs, tags);\
}
#define SpritesOn(rs) \
{ \
struct TagItem tags[] = \
{RSP_On, 1L, TAG_DONE, 0L}; \
\
Retina_SpriteFunction(rs, tags);\
}
void Error(char *s);
void __regargs RemTool(void *Tool);
void __regargs Quit(int ReturnCode, char *s);
void __regargs AddTool(void *NewTool, void (*ProcPtr)(void *,LONG), LONG NewSize, char *errmsg);
void __stdargs DeleteMsgPortSafely(struct MsgPort *AnyPort);
int __regargs ArgIntRange(char **ToolTypes, char *ID, int Min, int Default, int Max);
void __interrupt __saveds BlankerAction(CxMsg * CxMsg, CxObj * CO);
LONG GetNum(struct Window *BlankerWindow, struct Gadget *Gadget, LONG Min, LONG * Data, LONG Max);
void __regargs HandleCxMsg(CxObj * Broker, CxMsg * CxMsg, LONG * TimeUntilBlank, LONG * ThisTimeOut);
void DestroyScreen(struct RetinaScreen *rs);
struct RetinaScreen *CreateScreen(UBYTE *colors);
void __stdargs DeleteBlankerClient(struct MsgPort * ClientPort);
struct MsgPort *__regargs CreateBlankerClient(void *ClientRoutine, struct ClientMessage *ClientMessage);
void __regargs DrawLines(void *plist, struct RetinaScreen *rs);
void *__regargs CreateLines(struct RetinaScreen *Screen, LONG NumLines, LONG Speed);
WORD __regargs Random(WORD Max);
void __interrupt __saveds RLinesClientProcess(void);
void OpenBlankerWindow(void);
void CloseBlankerWindow(void);